<template>
  <h1>开关组件</h1>
  <el-switch
  v-model="value2"
  class="ml-2"
  style="--el-switch-off-color: #12ce66;--el-switch-off-color:#ff4949"
  />
  <br>
  <el-switch v-model="isShow"></el-switch>
  <hr>
  <img src="fcq.jpg" width="200" v-if="isShow">
  <hr>
  <el-switch v-model="numStr" active-value="1" inactive-value="0"></el-switch>
  <el-switch v-model="numStr" :active-value="'1'" :inactive-value="'0'"></el-switch>
</template>

<script setup>
import {ref} from "vue";

const value1 = ref(false)
const value2 = ref(false)
const isShow = ref(true);
const numStr = ref('0');
</script>

<style scoped>

</style>